//
//  VoiceItemContentHeadView.m
//  ShowYork
//
//  Created by hxh on 2021/5/21.
//  Copyright © 2021 hxh. All rights reserved.
//

#import "VoiceItemContentHeadView.h"

@interface VoiceItemContentHeadView ()
@property (nonatomic,strong)UIView *icon;
@property (nonatomic,strong)UILabel *titleLb;
@end

@implementation VoiceItemContentHeadView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setUI];
    }
    return self;
}
- (void)setUI{
    self.frame = CGRectMake(0, 0, kScreenW, 44);
    
    self.icon = [[UIView alloc]init];
    self.icon.backgroundColor = RGBA(238, 157, 59, 1);
    self.icon.layer.cornerRadius = 3;
    [self addSubview:self.icon];
    
    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(6, 6));
        make.centerY.equalTo(self);
        make.left.equalTo(self).offset(16);
    }];
    self.titleLb = [[UILabel alloc]init];
    self.titleLb.text = @"朗读";
    self.titleLb.textColor = C51;
    self.titleLb.font = [UIFont boldSystemFontOfSize:16];
    [self addSubview:self.titleLb];
    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.equalTo(self.icon.mas_right).offset(16);
    }];
}

- (void)setItemTitle:(NSString *)itemTitle{
    self.titleLb.text = itemTitle;
}

@end
